package com.crm.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@TableName("sys_user")
@Schema(description="用户信息")
public class User {
    @Schema(description="用户ID")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;
    @Schema(description="部门ID")
    private Long deptId;
    @Schema(description="用户账号")
    private String userName;
    @Schema(description="用户昵称")
    private String nickName;
    @Schema(description="用户类型（00系统用户）")
    private String userType;
    @Schema(description="用户邮箱")
    private String email;
    @Schema(description="手机号码")
    private String phonenumber;
    @Schema(description="用户性别（0男 1女 2未知）")
    private String sex;
    @Schema(description="头像地址")
    private String avatar;
    @Schema(description="密码")
    @TableField(updateStrategy = FieldStrategy.NOT_NULL)
    private String password;
    @Schema(description="帐号状态（0正常 1停用）")
    private String status;
    @Schema(description="删除标志（0代表存在 2代表删除）")
    private String delFlag;
    @Schema(description="最后登录IP")
    private String loginIp;
    @Schema(description="最后登录时间")
    private Date loginDate;
    @Schema(description="创建者")
    private String createBy;
    @Schema(description="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @Schema(description="更新者")
    private String updateBy;
    @Schema(description="更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    @Schema(description="备注")
    private String remark;
}
